package com.dyypdadmin.service.impl;

import com.dyypdadmin.dao.AdministratorDao;
import com.dyypdadmin.pojo.Administrators;
import com.dyypdadmin.service.AdministratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdministratorServiceImpl implements AdministratorService {
    @Autowired
    private AdministratorDao administratorDao;

    @Override
    public Administrators login(String email, String password) {
        return administratorDao.getAdminByEmailAndPassword(email, password);
    }
    @Override
    public int updateAdminPassword(Integer uid, String password) {
        return administratorDao.updateAdminPassword(uid, password);
    }
}
